package com.chain.BrotherExchange.widget;

import android.view.View;
import android.widget.EditText;

import com.chain.BrotherExchange.utils.Strings;

public class QuantityView {

    public static void modify(View increaseView, View minusView, EditText editText) {
        // 添加
        increaseView.setOnClickListener(v -> {
            editText.setText(Strings.increase(editText.getText().toString()));
        });

        // 减去
        minusView.setOnClickListener(v -> {
            editText.setText(Strings.subtract(editText.getText().toString()));
        });
    }
}
